const express = require('express');
const router = express.Router();
const constants = require('../db/constants')

const mediaController = require('../controller/v1/zlMediaHook');

/**
 * HOOK，给ZL回调使用
 */

router.post(constants.version + 'media/on_stream_not_found',   mediaController.onStreamNotFound);
router.post(constants.version + 'media/on_server_started',     mediaController.onServerStarted);
router.post(constants.version + 'media/on_stream_none_reader', mediaController.onStreamNoneReader);
router.post(constants.version + 'media/on_play',               mediaController.onPlay);
router.post(constants.version + 'media/on_stream_changed',     mediaController.onStreamChanged);
router.post(constants.version + 'media/on_publish',            mediaController.onPublish);
router.post(constants.version + 'media/on_http_access',        mediaController.onHttpAccess);
router.post(constants.version + 'media/on_flow_report',        mediaController.onFlowReport);
router.post(constants.version + 'media/on_server_keepalive',   mediaController.onServerKeepAlive);
router.post(constants.version + 'media/on_rtp_server_timeout',   mediaController.onRtpServerTimeout);
router.post(constants.version + 'media/on_record_mp4',   mediaController.onRecordMp4);
module.exports = router;
